//
//  SplashTableViewCell.swift
//  test-ios
//
//  Created by wyz5204 on 2023/3/1.
//

import UIKit

class SplashTableViewCell: AbstractTableViewCell<String> {
    
    lazy var title : UILabel = {
        return UILabel().then { label in
            label.textColor = .blue
            label.font = UIFont.systemFont(ofSize: 20)
        }
    }()
    
    lazy var image : UIImageView = {
        return UIImageView().then { imageView in
            imageView.image = UIImage.init(named: "right_arrow")
        }
    }()
    
    override func initView() {
        image.addTo(self.contentView) { view in
            view.snp.makeConstraints { make in
                make.width.equalTo(40)
                make.height.equalTo(40)
                make.centerY.equalToSuperview()
                make.right.equalToSuperview().offset(-20)
            }
        }
        
        title.addTo(self.contentView) { view in
            view.snp.makeConstraints { make in
                make.centerY.equalToSuperview()
                make.left.equalToSuperview().offset(20)
            }
        }
    }
    
    override func initBinder(_ view: UITableView, _ data: String, _ index: IndexPath) {
        title.text = data
    }
}
